let view = new View;
let game = new Game('game');

view.listen('create', () => {})

view.listen('room', () => {
  view.loading('加载中...', success => {
    app.action('room.list', null, success);
  })
})

view.listen('game', () => {
  game.init();
})

view.play('home');
// app.link();
// view.play('create');
// view.play('room')
// view.play('inputName')
// view.play('game');

// 模拟用户点击至游戏开始
app.link();

setTimeout(() => {
  app.username = 'test';
  app.sendUsername(true);

  app.createRoom();
  setTimeout(() => {
    app.startGame();
  }, 1000);
}, 1000);